package com.itheima.mybytestream2;

import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.Charset;

public class ByteStreamDemo5 {
    public static void main(String[] args) throws IOException {
        //gbk转换为utf-8

//        FileReader fr = new FileReader("c.txt", Charset.forName("GBK"));
//        FileWriter fw = new FileWriter("d.txt", Charset.forName("UTF-8"));
//
//        int ch;
//        while((ch=fr.read())!=-1){
//            fw.write(ch);
//        }
//        fw.close();
//        fr.close();

    }
}
